#ifndef CRC_H
#define CRC_H

#include <stdbool.h>
#include <inttypes.h>
#include "util/util.h"

#define TRUE    1
#define FALSE   0


#define                 P_CCITT     0x1021

unsigned short update_crc_ccitt(uint16_t crc, uint8_t c );

void init_crcccitt_tab( void );

void crcAppend(uint8_t *packet,uint16_t packetLength);

uint8_t crcCheck(uint8_t *packet,uint16_t packetLength);


#endif // CRC_H
